package com.example.yan.java方法;

public class MehtodDemo02 {


    public static void main(String[] args) {
        System.out.println(dueLl());
        System.out.println(dueLl(1));
        System.out.println(dueLl(1, 2));
        System.out.println(dueLl(1, 2, 23));
        System.out.println(dueLl(new int[]{1, 2, 3, 4, 5, 6, 7}));
    }

    public static int dueLl(int... ll) {
        int s = 0;

        for (int nums : ll) {
            s += nums;

        }
        return s;


    }

}
